home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / GASCASH.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  405b  |  19 lines

  1. ' GASCASH.BAS
  2. ' This program uses a FOR loop to track weekly gasoline expenses.
  3.  
  4. CLS
  5.  
  6. PRINT "For each of the seven days of the week, enter the amount ";
  7. PRINT "you spent on gasoline."
  8. PRINT
  9.  
  10. FOR day% = 1 TO 7
  11.     PRINT "  Cash spent on day"; day%;
  12.     INPUT "-->  $", dayTotal!
  13.     weekTotal! = weekTotal! + dayTotal!
  14. NEXT day%
  15.  
  16. PRINT
  17. PRINT "Wow!  $"; weekTotal!; "on gas in one week!"
  18.  
  19.